package org.m8.auth.config;

import jakarta.annotation.Resource;
import org.m8.foundation.support.config.ConfigCenter;
import org.springframework.stereotype.Service;

/**
 * 社交配置
 *
 * @author yidanjun
 * @date 2024/9/5
 **/
@Service
public class SocialConfig {


    @Resource
    private ConfigCenter configCenter;

    public static final String CLIENT_ID_KEY = "app_id";

    public static final String CLIENT_SECRET_KEY = "client_secret";

    public static final String AGENT_ID_KEY = "agent_id";

    public String getClientId(){
        return configCenter.getValue(AuthConstants.AUTHORIZATION_CONFIG_NAMESPACE, CLIENT_ID_KEY);
    }

    public String getClientSecret(){
        return configCenter.getValue(AuthConstants.AUTHORIZATION_CONFIG_NAMESPACE, CLIENT_SECRET_KEY);
    }

    public String getAgentId(){
        return configCenter.getValue(AuthConstants.AUTHORIZATION_CONFIG_NAMESPACE, AGENT_ID_KEY);
    }
}
